using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using MWIS.Common;
using MWIS.Controls;

public partial class Test : System.Web.UI.Page
{
    MwisDatabaseServices dbServices = new MwisDatabaseServices();
    MwisProducts smsServices = new MwisProducts();
    MwisXml xmlServices = new MwisXml();
    
    DataSet ds = new DataSet();

    protected void Page_Load(object sender, EventArgs e)
    {
        MwisDataGrid mwisData = new MwisDataGrid();
        mwisData.SpName = "SPTest";

        //ds=dbServices.getData("SPTest");
        
        //DataControlField product = new BoundColumn();
        //product.HeaderText = "Product Name";
        //DataControlField product=null;
        //product = new BoundColumn();
        //BoundColumn product = new BoundColumn();
        //DataControlFieldCollection myFields=new DataControlFieldCollection();
        //myFields.Add(product);
        //name.HeaderText = "Kanishka";
        //product.HeaderText = "Product Name";
       //gridTest.Columns.Add(
        //gridTest.DataSource = ds.Tables[0].DefaultView;
        //gridTest.DataBind();
    }

    protected void Button1_Click(object sender, EventArgs e)
    {

        smsServices.PCode = "VGBL";

        smsServices.ProductID = xmlServices.getProductID(smsServices.PCode);
        smsServices.QtyPrice = 23.50F;
        smsServices.Units = "50K";
        smsServices.ValPeriod = 100;

        smsServices.calValidationPeriod();

        smsServices.saveProduct();
    }
}
